Skip to content

Add env push force confirmation flag#3831

Merged
gonzaloriestra merged 1 commit into
mainfrom
gdt-hydrogen-env-push-agent-confirm
Jul 8, 2026
Merged

Add env push force confirmation flag#3831
gonzaloriestra merged 1 commit into
mainfrom
gdt-hydrogen-env-push-agent-confirm

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes https://github.com/shop/issues-develop/issues/22875

shopify hydrogen env push showed a diff confirmation prompt that agents could not skip.

WHAT is this pull request doing?

Adds --force to hydrogen env push so environment variable pushes can proceed without the diff confirmation prompt.

Also, adds --dry-run (can't be used with force) to preview the diff without doing any change.

HOW to test your changes?

Use a linked Hydrogen project with a changed local .env file:

shopify hydrogen env list --path ./my-hydrogen-app
shopify hydrogen env push --path ./my-hydrogen-app --env preview --dry-run
shopify hydrogen env push --path ./my-hydrogen-app --env preview --force

The push command should skip the environment variable diff confirmation prompt.

dry-run push

gonzaloriestra commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@shopify

shopify Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Oxygen deployed a preview of your gdt-hydrogen-env-push-agent-confirm branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2026 8:56 AM

Learn more about Hydrogen's GitHub integration.

@gonzaloriestra gonzaloriestra changed the base branch from gdt-hydrogen-init-agent-flags to graphite-base/3831 July 3, 2026 12:10
@gonzaloriestra gonzaloriestra force-pushed the gdt-hydrogen-env-push-agent-confirm branch from b8922b7 to 020210c Compare July 3, 2026 12:10
@gonzaloriestra gonzaloriestra changed the base branch from graphite-base/3831 to main July 3, 2026 12:10
@gonzaloriestra gonzaloriestra force-pushed the gdt-hydrogen-env-push-agent-confirm branch from 020210c to 3841045 Compare July 3, 2026 12:23
@gonzaloriestra gonzaloriestra changed the title Add env push confirmation bypass flags Add env push force confirmation flag Jul 3, 2026
@gonzaloriestra gonzaloriestra marked this pull request as ready for review July 3, 2026 14:29
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner July 3, 2026 14:29
Comment thread .changeset/hydrogen-env-push-agent-confirm.md
@gonzaloriestra gonzaloriestra force-pushed the gdt-hydrogen-env-push-agent-confirm branch from 3841045 to 3f36df5 Compare July 7, 2026 10:13
Add --force and --yes to hydrogen env push so agents can push an already-computed environment diff without answering the confirmation prompt.\n\nThe command still fetches environments, filters read-only and secret variables, detects no-op pushes, and shows the existing prompt by default. When either confirmation flag is set, it skips only the final diff confirmation and proceeds to push the local variables.\n\nTests cover both flag spellings and assert that the prompt is skipped while the push mutation receives the expected variables. The Oclif manifest and changeset are updated for the new flags.\n\nCloses shop/issues-develop#22875
@gonzaloriestra gonzaloriestra force-pushed the gdt-hydrogen-env-push-agent-confirm branch from 3f36df5 to 30d29d6 Compare July 8, 2026 08:55

gonzaloriestra commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Jul 8, 9:26 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 8, 9:26 AM UTC: @gonzaloriestra merged this pull request with Graphite.

@gonzaloriestra gonzaloriestra merged commit 330d669 into main Jul 8, 2026
20 of 22 checks passed
@gonzaloriestra gonzaloriestra deleted the gdt-hydrogen-env-push-agent-confirm branch July 8, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants